package com.huaxiafinance.management.dto.request;

import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 * Created by huangwencheng on 2017/11/07.
 */
public class ScoreGiftDto {

    @NotBlank(message = "批次名称不能为空")
    private String codeName;

    @Max(value = 9999, message = "积分获取最大为9999")
    @Min(value = 1, message = "积分获取最小为1")
    @NotNull(message = "积分不能为空")
    private Integer score;

    @Max(value = 999, message = "发放量最大为999")
    @Min(value = 1, message = "发放量最小为1")
    @NotNull(message = "发放量不能为空")
    private Integer circulation;

    @NotNull(message = "有效期不能为空")
    private Integer isPermanent;

    @NotBlank(message = "备注不能为空")
    @Size(max = 50,message = "备注不能超过50字")
    private String remarks;

    @NotNull(message = "操作人id不能为空")
    private Integer adminId;

    private String endTime;

    public String getCodeName() {
        return codeName;
    }

    public void setCodeName(String codeName) {
        this.codeName = codeName;
    }

    public Integer getScore() {
        return score;
    }

    public void setScore(Integer score) {
        this.score = score;
    }

    public Integer getCirculation() {
        return circulation;
    }

    public void setCirculation(Integer circulation) {
        this.circulation = circulation;
    }

    public Integer getIsPermanent() {
        return isPermanent;
    }

    public void setIsPermanent(Integer isPermanent) {
        this.isPermanent = isPermanent;
    }

    public String getRemarks() {
        return remarks;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }

    public Integer getAdminId() {
        return adminId;
    }

    public void setAdminId(Integer adminId) {
        this.adminId = adminId;
    }

    public String getEndTime() {
        return endTime;
    }

    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }

    @Override
    public String toString() {
        return "ScoreGiftDto{" +
                "codeName='" + codeName + '\'' +
                ", score=" + score +
                ", circulation=" + circulation +
                ", isPermanent=" + isPermanent +
                ", remarks='" + remarks + '\'' +
                ", adminId=" + adminId +
                ", endTime='" + endTime + '\'' +
                '}';
    }
}
